package com.hilin.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hilin.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author qhl
 * @since 2021-11-24
 */
@Data
@ApiModel("消息发送到用户列表")
@TableName("msg_users")
public class MsgUsersPo extends BaseEntity<MsgUsersPo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("所属机构ID")
    @TableField("org_id")
    private Long orgId;
    @ApiModelProperty("消息ID")
    @TableField("msg_id")
    private Long msgId;
    @ApiModelProperty("用户ID")
    @TableField("account_id")
    private String accountId;
    @ApiModelProperty("消息发送时间;同消息表的send_time字段，仅作为冗余字段")
    @TableField("send_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sendTime;
    @ApiModelProperty("收到消息时间")
    @TableField("receive_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveTime;
    @ApiModelProperty("是否已读;1是 2否")
    @TableField("is_read")
    private Integer isRead;
    @ApiModelProperty("读取时间")
    @TableField("read_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date readTime;
    @ApiModelProperty("创建时间")
    @TableField("creator_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creatorTime;
    @ApiModelProperty("更新时间")
    @TableField("updator_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatorTime;
}